<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
  <%@include file="../common/tag.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<base href="<%=basePath%>">
<link href="${ctx}/assets/css/bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="${ctx}/css/style.css"/>
<script src="${ctx}/assets/js/jquery-1.10.2.js"></script>
<script src="${ctx}/assets/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="${ctx}/css/personalCenter.css" />
</head>
	<script type="text/javascript">
			function chike(){
				var balance=document.getElementsByName("balance")[0].value
				if(balance.length<=0){
					alert("充值金额不能输入空");
				}else if(!(balance>=0)){
					alert("你充值的金额不和格")
				}else{
					document.forms[0].submit();
				}
					
			}
	</script>
</head>
<body>
	<div class="globalContainer clearfix">
   <div class="mainContainer">
   			<jsp:include page="/WEB-INF/views/jsp/user/nav.jsp"/>
			<div id="county" class="rightCol"   >
				</nav>
					<div id="page-wrapper" >
						<div class="tab_1">
							<table class="table">
								<!--<caption>响应式表格布局</caption>-->
								<thead>
									<tr>
										<th>用户名</th>
										<th>电话号码</th>
										<th>性别</th>
										<th>余额</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>${sessionScope['USER'].username}</td>
										<td>${sessionScope['USER'].phone}</td>
										<td>${sessionScope['USER'].sex}男</td>
										<td>${sessionScope['USER'].balance}</td>
										<td href="#modal-container-861314" data-toggle="modal">充值</td>
									</tr>
								</tbody>
							</table>
						</div>
					<div class="modal fade" id="modal-container-861314" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h3 class="modal-title" id="myModalLabel">
											用户余额${sessionScope['USER'].balance}
										</h3>
									</div>
									<form action="${ctx}/user/updateBalance.do" method="post">
										<div class="modal-body">
												<input type="number" class="form-control" name="balance" placeholder="请输入要充值的金额" />
										</div>
										<div class="modal-footer">
											 <button type="submit" class="btn btn-default" data-dismiss="modal">取消</button>
											 <button type="submit" class="btn btn-primary" >充值</button>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
					<div class="clearfix">&nbsp;</div>
			</div>
			<jsp:include page="/WEB-INF/views/jsp/user/foot.jsp"/>
		<div>
	</body>
</html>